from django import forms

from App.bootstrap import BootStrapModelForm
from App.models import Hotel


class HotelForm(BootStrapModelForm):
    name_hotel = forms.CharField(
        label='酒店名',
        widget=forms.TextInput(attrs={
            'placeholder': '请输入酒店名',
        })
    )

    img_index = forms.ImageField(
        label='主页宣传图',
    )

    phone_hotel = forms.CharField(
        min_length=1,
        max_length=11,
        label='联系电话',
        widget=forms.TextInput(attrs={
            'placeholder': '请输入联系电话',
        })
    )

    class Meta:
        model = Hotel
        fields = '__all__'
